Hi all. I am trying to run an external check that runs a Ruby script.
Basically I am trying to call the following wrapper:
For some reason when Zabbix calls either the wrapper OR the ruby script directly, it is unable to require any ruby libraries.
gem env
Thanks for taking the time to read this!
Let me know if I can provide any additional information... This is my first night using Zabbix.
Basically I am trying to call the following wrapper:
Code:
#~/usr/bin/env bash /usr/lib/zabbix/externalscripts/rubytest.rb
Code:
/var/log/zabbix/zabbix_server.log item "Test_Miner:rubytest.rb" became not supported: Received value [/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- /home/ec2-user/.gem/ruby/gems/cgminer-api-0.1.0/lib/cgminer/api (LoadError) from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
Code:
-rwxrwxrwx 1 zabbix zabbix 65 Nov 17 05:58 zabbixtest.sh -rwxrwxrwx 1 zabbix zabbix 478 Nov 17 06:11 rubytest.rb
Code:
RubyGems Environment:
- RUBYGEMS VERSION: 2.0.14.1
- RUBY VERSION: 2.0.0 (2015-12-16 patchlevel 648) [x86_64-linux]
- INSTALLATION DIRECTORY: /home/ec2-user/.gem/ruby
- RUBY EXECUTABLE: /usr/bin/ruby
- EXECUTABLE DIRECTORY: /home/ec2-user/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /home/ec2-user/.gem/ruby
- /usr/share/gems
- /usr/local/share/gems
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
Let me know if I can provide any additional information... This is my first night using Zabbix.